/**
 * 
 */
package org.myOrg.spetrum.GUI;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;
import javax.swing.UIManager;

   
/**
 * 
 * @author XinTao Niu
 *
 */
public class MainFrame extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private MenuBar menuBar;
	private ContentPanel content;
	private void build(){
		setLookAndFeel();
		menuBar = new MenuBar();
		content = new ContentPanel();
		this.setJMenuBar(menuBar);
		this.getContentPane().add(content);
		
		this.setVisible(true);
		this.setTitle("spectrum analyse");
		this.setSize(560, 300);
		this.setLocationRelativeTo(null);
		
		this.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});
	}
	public void setLookAndFeel(){
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			System.out.println("can't get system subject");
		}
	}
	public MainFrame (){
		this.build();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new MainFrame();
	}
}
